.\"                                      Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH FOLDER2RAM 8 "2015" "folder2ram"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n>    insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
folder2ram \- automated tmpfs folder management
.SH SYNOPSIS
\fBfolder2ram\fP \fIaction\fP \fB\-autostartinit\fP [\fB\-autostartsystemd\fP] [\fB\-autostopinit\fP] [\fB\-autostopsystemd\fP] [\fB\-status\fP] [\fB\-syncall\fP] [\fB\-mountall\fP] [\fB\-umountall\fP] [\fB\-configure\fP] [\fB\-reset\fP] [\fB\-clean\fP]
.PP
.SH DESCRIPTION
\fBfolder2ram\fP folder2ram is a script-based utility that relocates the contents of a folder 
to tmpfs (more options in the future) and synching the data back to the permanent storage 
on command or on shutdown .

.SH OPTIONS
.TP
\fIaction\fP
This option specifies the action to execute. It could be :
.RS
.TP .4i
\fB-enableinit\fP:
sets up an appropriate autostart/stop init script, does not start it
.TP
\fB-enablesystemd\fP:
sets up an appropriate autostart/stop systemd service, does not start it
.TP
\fB-disableinit\fP:
removes the autostart/stop init script and unmounts all mount points
.TP
\fB-disablesystemd\fP:
removes the autostart/stop systemd service and unmounts all mount points
.TP
\fB-safe-disableinit\fP:
removes the autostart/stop init script but unmounts only at shutdown (hence safely)
it also works if folder2ram is unistalled shortly afterwards
.TP
\fB-safe-disablesystemd\fP:
removes the autostart/stop systemd service but unmounts only at shutdown (hence safely)
it also works if folder2ram is unistalled shortly afterwards
.TP
\fB-status\fP:
print all mountpoints and their status (mounted or unmounted)
.TP
\fB-syncall\fP:
sync to disk the content of folder2ram's tmpfs folders
.TP
\fB-mountall\fP:
folder2ram will mount the folders in the config file
.TP
\fB\-umountall\fP
folder2ram will sync and unmount all folders in the config file
.TP
\fB\-configure\fP
open the configuration file in a text editor
.TP
\fB\-clean\fP
unmounts all folders then removes any autostart
.TP
\fB\-reset\fP
delete folder2ram autostart and restore default config file
.SH DEFAULTS
By default, \fBfolder2ram\fP won't make /var/run, /var/lock or /tmp available as
ram filesystems. Since \fBsysvinit\fP provides a way to achieve this, it is
preferable to use it. See \fBtmpfs\fP(5) for more information.
.SH INIT SCRIPTS 
The init scripts are completely independent from the folder2ram configuration file and configuration script.
Each mount point has its own initscript. This tends to pollute a bit the init folder, but allows safer 
operation since if/when a script fails the others are unaffected.
.SH FILES
.PP
.IP "/etc/folder2ram/folder2ram.conf"
configuration file,
.IP "/sbin/folder2ram"
configuration script
.IP "/var/folder2ram/*"
here you will find the bind-mounted folders so you (and folder2ram) can access the original folder in permanent storage to sync the contents of the tmpfs  
.SH SEE ALSO
\fBmount\fP(8), \fBtmpfs\fP(5).
.SH AUTHOR
the author of folder2ram is Alberto Bursi <starshipeleven@hotmail.it>
